<!-- 会员中心主内容区 -->
<div class="page-article">
  <!-- 我的评论 -->
  <div id="member_aftersales" class="member-aftersales">
    <div class="member-tabs">
      <a href="<{link app=aftersales ctl=site_member act=afterlist}>" class="active"><em><{t}>申请退款<{/t}></em></a>
      <a href="<{link app=aftersales ctl=site_member act=refundrecord}>"><em><{t}>退款记录<{/t}></em></a>
    </div>
    <div class="member-mod">
      <iframe src="about:blank" name="upload" frameborder="0" class="hide"></iframe>
      <form action="<{link app=aftersales ctl=site_member act=to_refund}>" method="post" enctype="multipart/form-data" encoding="multipart/form-data" target="upload">
        <input type="hidden" name="order_id" value="<{$order.order_id}>">
        <input type="hidden" name="apply_id" value="<{$refundInfo.apply_id}>">
        <div id="member_aftersales_goods" class="member-aftersales-goods">
          <table class="member-grid">
            <thead>
            <tr>
              <th><{t}>订单号<{/t}></th>
              <th><{t}>金额<{/t}></th>
              <th><{t}>下单时间<{/t}></th>
              <th><{t}>订单状态<{/t}></th>
              <th><{t}>支付方式<{/t}></th>
            </tr>
          </thead>
            <tbody class="first">
              <tr>
                <td class="numbers">
                  <{$order.order_id}>
                </td>
                <td class="numbers">
                  <{$order.final_amount}>
                </td>
               <td class="numbers">
                  <{$order.createtime|cdate:FDATE_STIME}>
                </td>
                <td class="status">
            <!-- 添加取消发货状态 -->
              <{switch from=$order.status}>
              <{case value='finish'}><{t}>已完成<{/t}>
              <{case value='dead'}><{t}>已作废<{/t}>
              <{case}>
              <{switch from=$order.pay_status}>
              <{case value='1'}><{t}>已付款<{/t}>
              <{switch from=$order.ship_status}>
              <{case value='1'}><{t}>[已发货]<{/t}>
              <{case value='2'}><{t}>[部分发货]<{/t}>
              <{case value='3'}><{t}>[部分退货]<{/t}>
              <{case value='4'}><{t}>[已退货]<{/t}>
              <{case value='5'}><{t}>[取消发货]<{/t}>
              <{case}><{t}>[正在备货]<{/t}>
              <{/switch}>
              <{case value='2'}><{t}>已付款至担保方<{/t}>
              <{case value='3'}>
               <!--普通订单-->
              <{if $order.promotion_type != 'prepare'}>
                <a href="<{link app=b2c ctl=site_paycenter arg0=$order.order_id}>"><{t}>等待补款<{/t}></a>
              <{/if}>
               <!--预售订单-->
              <{if  $order.promotion_type == 'prepare'}>
              <a href="#"><{t}>等待补款<{/t}></a>
              <{/if}>
              <{switch from=$order.ship_status}>
              <{case value='1'}><{t}>[已发货]<{/t}>
              <{case value='2'}><{t}>[部分发货]<{/t}>
              <{case value='3'}><{t}>[部分退货]<{/t}>
              <{case value='4'}><{t}>[已退货]<{/t}>
              <{case value='5'}><{t}>[取消发货]<{/t}>
              <{/switch}>
              <{case value='4'}><{t}>部分退款<{/t}>
              <{switch from=$order.ship_status}>
              <{case value='0'}><{t}>[未发货]<{/t}>
              <{case value='1'}><{t}>[已发货]<{/t}>
              <{case value='2'}><{t}>[部分发货]<{/t}>
              <{case value='3'}><{t}>[部分退货]<{/t}>
              <{case value='4'}><{t}>[已退货]<{/t}>
              <{case value='5'}><{t}>[取消发货]<{/t}>
              <{/switch}>
              <{case value='5'}><{t}>已退款<{/t}>
              <{switch from=$order.ship_status}>
              <{case value='0'}><{t}>[未发货]<{/t}>
              <{case value='1'}><{t}>[已发货]<{/t}>
              <{case value='2'}><{t}>[部分发货]<{/t}>
              <{case value='3'}><{t}>[部分退货]<{/t}>
              <{case value='4'}><{t}>[已退货]<{/t}>
              <{case value='5'}><{t}>[取消发货]<{/t}>
              <{/switch}>
              <{case}>
               <!--普通订单-->
              <{if $order.promotion_type != 'prepare'}>
                <{if $order.payinfo.pay_app_id != '-1'}><a href="<{link app=b2c ctl=site_paycenter arg0=$order.order_id}>"><{/if}><{t}>等待付款<{/t}><{if $order.payinfo.pay_app_id != '-1'}></a><{/if}>
              <{/if}>
              <!--预售订单-->
               <{if $order.promotion_type == 'prepare'}>
                <{if $order.payinfo.pay_app_id != '-1'}><a href="#"><{/if}><{t}>等待付款<{/t}><{if $order.payinfo.pay_app_id != '-1'}></a><{/if}>
              <{/if}>
              <{switch from=$order.ship_status}>
              <{case value='1'}><{t}>[已发货]<{/t}>
              <{case value='2'}><{t}>[部分发货]<{/t}>
              <{case value='3'}><{t}>[部分退货]<{/t}>
              <{case value='4'}><{t}>[已退货]<{/t}>
              <{/switch}>
              <{/switch}>
              <{/switch}>
            </td>
            <td class="payments"><{t}><{$order.payinfo.pay_app_id|pay_name}><{/t}></td>
              </tr>
            </tbody>
          </table>
        </div>
        <ul class="member-content">
          <li class="form-item">
            <label for="" class="form-label"><em class="warn">*</em><{t}>退款金额：<{/t}></label>
            <span class="form-act">
              <input type="text" name="apply_money" onkeyup="value=value.replace(/[^\d.]/g,'')" placeholder="<{t}>退款金额请和客服沟通<{/t}>" value="<{$refundInfo.apply_money}>" vtype="required" data-caution="<{t}>退款金额请和客服沟通<{/t}>">
            </span>
          </li>
          <li class="form-item">
            <label for="" class="form-label"><em class="warn">*</em><{t}>退款理由：<{/t}></label>
            <span class="form-act">
              <input type="text" name="content" class="x-input" placeholder="<{t}>描述退款理由<{/t}>" value="<{$refundInfo.content}>" vtype="required" data-caution="<{t}>请填写退款理由<{/t}>">
            </span>
          </li>
          <li class="form-item"><span class="form-act">
              <{button type="submit" class="btn-caution" label="提交申请"}>
              <a href="<{link app=aftersales ctl=site_member act=afterlist}>" class="btn btn-simple"><span><span><{t}>取消申请<{/t}></span></span></a>
          </span></li>
        </ul>
      </form>
    </div>
  </div>
</div>
<script>
var submit = $('member_aftersales').getElement('button[type=submit]');
function ajax_callback1(type, msg, url) {
    if(type == 'error') {
        submit.removeClass('disabled');
    }
    return top.Message( msg, type, function(){
        if(url) location.href = url;
    });
}
</script>

